
public class PointDriver {
    public static void main(String[] args) {
        Point point1 = new Point(3, -2);
        Point point2 = new Point(5, 4);
        
        System.out.println("Point1:  x = " + point1.getX() + ", y = " + point1.getY());
        System.out.println("Point2: x = " + point2.getX() + ", y = " + point2.getY());
        	
        double dist = point1.distance(point2);
        
        System.out.printf("The distance between Point1 and Point2 is %.2f cm%n", dist);
        
        System.out.println("\nPoint1 before swapping coordinates:");
        System.out.println("Point1:  x = " + point1.getX() + ", y = " + point1.getY());
        System.out.println("Point1 after swapping coordinates:");
        point1.swapCoordinates();
        System.out.println("Point1:  x = " + point1.getX() + ", y = " + point1.getY());
        
        System.out.println("\nPoint2 before translation:");
        System.out.println("Point2: x = " + point2.getX() + ", y = " + point2.getY());
        System.out.println("Point2 after translation:");
        point2.translate(-5, -6);
        System.out.println("Point2: x = " + point2.getX() + ", y = " + point2.getY());
    }
}
